package actions;

import java.util.List;
import org.apache.log4j.Logger;
import beans.User;

import com.opensymphony.xwork2.ActionSupport;

import controllers.AbstractController;


public class CreateModule extends ActionSupport {

	private static final long serialVersionUID = 1164809814839976523L;

	private static final Logger LOGGER = Logger.getLogger(CreateModule.class);

	
	// -------------------------------------------------------------
	// Objects
	// -------------------------------------------------------------

	AbstractController controller = new AbstractController();

	private String moduleName;
	private String enseirbId;
	private String description;
	private String ownerId;
	
	private boolean result;
	
	
	// -------------------------------------------------------------
	// Methods
	// -------------------------------------------------------------

	public String execute() {
		setResult(controller.createModule(getModuleName(), getEnseirbId(), getDescription(), Integer.parseInt(getOwnerId())));
		return SUCCESS;
	}

	
	public String getModuleName() {
		return moduleName;
	}


	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}


	public String getEnseirbId() {
		return enseirbId;
	}


	public void setEnseirbId(String enseirbId) {
		this.enseirbId = enseirbId;
	}


	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}


	public String getOwnerId() {
		return ownerId;
	}


	public void setOwnerId(String ownerId) {
		this.ownerId = ownerId;
	}


	public boolean isResult() {
		return result;
	}


	public void setResult(boolean result) {
		this.result = result;
	}





}
